package com.fire.web.modules.all.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.fire.web.modules.all.entity.RecordAlarmModel;
import com.fire.web.modules.all.mapper.RecordAlarmMapper;
import com.fire.web.modules.all.service.IRecordAlarmService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 告警消除记录Service
 *
 * @author Matthew
 * @Date 2019-01-21 19:33
 */
@Service
public class RecordAlarmServiceImpl extends ServiceImpl<RecordAlarmMapper, RecordAlarmModel> implements IRecordAlarmService {

    private static final Logger LOGGER = LoggerFactory.getLogger(RecordAlarmServiceImpl.class);

    @Autowired
    private RecordAlarmMapper recordAlarmMapper;

    @Override
    public RecordAlarmModel selectOne(RecordAlarmModel entity){
        return recordAlarmMapper.selectOne(entity);
    }

    @Override
    public List<RecordAlarmModel>selectList(RecordAlarmModel model){
        return recordAlarmMapper.selectListByModel(model);
    }

    @Override
    public Page<RecordAlarmModel> selectPage(int currentPage, int pageSize, Wrapper<RecordAlarmModel> wrapper){
        return selectPage(new Page<RecordAlarmModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<RecordAlarmModel> wrapper){
        return selectMapsPage(new Page<RecordAlarmModel>(currentPage,pageSize), wrapper);
    }

}
